package com.dorso.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dorso.entity.Supplier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;

@Mapper
public interface SupplierDao extends BaseMapper<Supplier> {
    @Select("select * from supplier s" +
            " inner join product_supplier ps on s.id=ps.supplier_id" +
            " where ps.product_id = #{productIds}")
    public List<Supplier> findSuppliersByProduct(String productId);
}


